<extend name="Index:base" />
<block name="title"><title>商品详情-{$goods.productname}</title></block>
<block name="style2">
<link href="__PUBLIC__/Home/css/base.css" rel="stylesheet" type="text/css">	
<link href="__PUBLIC__/Home/css/home_header2.css" rel="stylesheet" type="text/css">	
<!-- <link href="__PUBLIC__/Home/css/zzsc.css" type="text/css" rel="stylesheet"> -->
<link href="__PUBLIC__/Home/css/magiczoomplus.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="__PUBLIC__/Home/js/mzp-packed.js"></script>

</block>	

 <block name="body">
 <style>
#hot_sales_tab a,#hot_collect_tab a{text-decoration:none}
</style>
		<div class="nch-breadcrumb-layout">
			<div class="nch-breadcrumb wrapper"><i class="icon-home"></i>
				<span><a href="/shop/index.html">首页</a></span>
				<foreach name="goods.grade_list" item="vo">
				<span class="arrow">&gt;</span>
				<span><a href="">{$vo.name}</a></span>
				</foreach>
				<span class="arrow">&gt;</span>
				<span>{$goods.productname}</span>
			</div>
		</div>
<link href="__PUBLIC__/Home/css/home_goods.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__PUBLIC__/Home/js/mz-packed.js" charset="utf-8"></script>
		<div class="wrapper pr">
			<input type="hidden" id="lockcompare" value="unlock">
			<div class="ncs-detail ownshop">
				<!-- 焦点图 -->
				<div id="ncs-goods-picture" class="ncs-goods-picture">
					<div class="" style="padding:10px;">
					<div class="">
						<a href="{$goods.pic}" id="zoom1" class="MagicZoom MagicThumb" style="clear:both;">
							<img src="{$goods.pic}" class=" cloudzoom" style="width:360px;height:360px;"/>
							
						</a>
					</div>
					</div>
					<div style="clear:both;"></div>
					<div class="controller_wrap"  style="clear:both;">
						<div class="controller">
							<ul id="showArea">
								<foreach name="goods.imgset" item="vo">
								<li class="current">
									<img title="鼠标滚轮向上或向下滚动，能放大或缩小图片哦~" src="{$vo.name}" class="cloudzoom" width="60" height="60" data-cloudzoom="useZoom: &#39;.cloudzoom&#39;, image: &#39;{$vo.name}" >
								</li>
								</foreach>
							</ul>
						</div>
					</div>
				</div>

				<!-- //焦点图 -->
				<!-- S 商品基本信息 -->
				<div class="ncs-goods-summary">
					<div class="name">
						<h1>{$goods.productname}</h1>
						<strong></strong> </div>
					<div class="ncs-meta">
						<!-- S 商品参考价格 -->
						<if condition="$goods.goods_marketprice gt '0'">
						<dl>
						  <dt>市&nbsp;&nbsp;场&nbsp;&nbsp;价：</dt>
						  <dd class="cost-price"><strong>&yen;{$goods.goods_marketprice}</strong></dd>
						</dl>
						</if>
						<!-- E 商品参考价格 -->
						<!-- S 商品发布价格 -->
						{$pay_html}
						<!-- <dl class="good-price">
							<dt>商&nbsp;&nbsp;城&nbsp;&nbsp;价：</dt>
							<dd class="price">
								<strong>¥{$goods.price}</strong>
							</dd>
						</dl> -->
						<!-- E 商品发布价格 -->
					<if condition="$goods.give_coin gt 0">
						<dl class="good-price">
							<dt style="color: red; ">赠&nbsp;&nbsp;&nbsp;送：</dt>
							<dd class="price" >
								<strong style="color: #bb8200; font-size:18px;">{$goods.give_coin}&nbsp;&nbsp;<font style="font-size:14px;">增值币</font></strong>
							</dd>
						</dl>
					</if>	
					</div>
					<!-- S 促销 -->
					<div class="ncs-sale">
					
						<!--<dl>
							<dt>促　　销：</dt>
							<dd class="promotion-info">

 								<div class="ncs-mansong"> <span class="sale-name">满即送</span> <span class="sale-rule">
              单笔订单满              <em>¥88.00</em>
                            ，立减<em>¥20.00</em>
                                          ，送<a href="#" title="绿联 30285 桌面手机支架 创意可调节多功能懒人支架ipad手机平" target="_blank">赠品</a>
                            </span>
									<span class="sale-rule-more" nctype="show-rule">
                            	<a href="javascript:void(0);">共<strong>1</strong>项，展开查看<i></i></a>
                            </span>
									<div class="sale-rule-content" style="display: none;" nctype="rule-content">
										<div class="title"><span class="sale-name">满即送</span>共<strong>1</strong>项，促销活动规则
											<a href="javascript:;" nctype="hide-rule">关闭</a>
										</div>
										<div class="content">
											<div class="mjs-tit">好商城2017满即送活动 <time>( 活动时间：2017-01-11--2018-01-31 )</time>
											</div>
											<ul class="mjs-info">
												<li> <span class="sale-rule">单笔订单满<em>¥88.00</em>
                                            ， 立减<em>¥20.00</em>
                                                                  ， 送 <a href="#" title="绿联 30285 桌面手机支架 创意可调节多功能懒人支架ipad手机平" target="_blank" class="gift"> <img src="/images/1_57b17e30n80e42777_60.png" alt="绿联 30285 桌面手机支架 创意可调节多功能懒人支架ipad手机平"> </a>&nbsp;。
                                            </span> </li>
											</ul>
											<div class="mjs-remark">欢迎来体验好商城哦。</div>
										</div>
										<div class="bottom">
											<a href="#" class="url" target="_blank">查看更多店铺“满即送”活动商品</a>
										</div>
									</div>
								</div> 
							</dd>
						</dl>-->
						<!-- S 赠品 -->
						<!-- E 赠品 -->

					</div>
					<dl class="rate">
						<!-- S 描述相符评分 -->
						<dd>
							<span>销量<i>{$goods.goods_salenum}</i></span>
							<span>
								<a href="#">累评价<i>{$goods.evaluation_count}</i></a>
							</span>
							<span class="star">评分<i class="raty" data-score="5" style="width: 100px;">
								<img src="__PUBLIC__/Home/images/star-on.png" alt="1" >&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="2" >&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="3" >&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="4" >&nbsp;<img src="__PUBLIC__/Home/images/star-on.png" alt="5" ><input type="hidden" name="score" value="5" readonly="readonly"></i></span>
						</dd>
						<!-- E 描述相符评分 -->
					</dl>
					<!-- E 促销 -->

					<div class="ncs-logistics">
						<!-- S 物流与运费新布局展示  -->
						<dl id="ncs-freight" class="ncs-freight">
							<dt>配&nbsp;&nbsp;送&nbsp;&nbsp;至：</dt>
							<dd class="ncs-freight_box">
								<div id="ncs-freight-selector" class="ncs-freight-select">
									<div class="text">
										<div>请选择地区</div>
										<b>∨</b> </div>
									<div class="content">
										<div id="ncs-stock" class="ncs-stock" data-widget="tabs">
											<div class="mt">
												<ul class="tab">
													<li data-index="0" data-widget="tab-item" class="curr">
														<a href="#" class="hover"><em>请选择</em><i> ∨</i></a>
													</li>
												</ul>
											</div>
											<div id="stock_province_item" data-widget="tab-content" data-area="0">
												<ul class="area-list">
												</ul>
											</div>
											<div id="stock_city_item" data-widget="tab-content" data-area="1" style="display: none;">
												<ul class="area-list">
												</ul>
											</div>
											<div id="stock_area_item" data-widget="tab-content" data-area="2" style="display: none;">
												<ul class="area-list">
												</ul>
											</div>
										</div>
									</div>
									<a href="javascript:;" class="close" onclick="$(&#39;#ncs-freight-selector&#39;).removeClass(&#39;hover&#39;)">关闭</a>
								</div>
								<div id="ncs-freight-prompt"> <strong><if condition="$goods.goods_storage gt '0'"> 库存：{$goods.goods_storage}&nbsp;件<else/>无货 </if></strong> <if condition="$goods.goods_freight gt '0'"> 运费：{$goods.goods_freight}<else/>免运费 </if></div>
							</dd>
						</dl>
						<!-- S 物流与运费新布局展示  -->
						<!-- S 门店自提 -->
						<!-- E 门店自提 -->
					</div>
					<div class="ncs-key">

						<!-- S 商品规格值-->
						<hr>
						<eq name="goods.goods_c" value="1">
						<dl nctype="nc-spec">
							<dt>颜色：</dt>
							<dd>
								<ul nctyle="ul_sign">
									<!-- 图片类型规格-->
<!-- 									<li class="sp-img">
										<a href="javascript:void(0);" class="hovered" title="红色">
											<img src="/images/1_05374569268411268_60.png">红色<i></i>
										</a>
									</li> -->
									<!-- 图片类型规格-->
									<foreach name="goods.goods_color" item="vo">
									<if condition="$vo neq ''">
									<if condition="$vo.id gt 0">
									<li class="sp-img">
										
										<a href="javascript:void(0);" class="" title="{$vo.name}" style="padding: 0 8px 0 8px;" data-colorid="{$vo.id}" data-colorsize="{$vo.size}" nytcdata="goods_color">
											{$vo.name}<i></i>
										</a>
										
									</li>
									<else />
									<li class="sp-img">
										
										<a href="javascript:void(0);" class="" title="{$vo}" data-colorname="{$vo}" style="padding: 0 8px 0 8px;">
											{$vo}<i></i>
										</a>
										
									</li>
									</if>
									</if>
									</foreach>
								</ul>
							</dd>
						</dl>
						</eq>
						<eq name="goods.goods_s" value="2">	
						<if condition="$goods.goods_spec neq ''">					
						<dl nctype="nc-spec">
							<dt>规格：</dt>
							<dd>
								<ul nctyle="ul_sign">
									<!-- 图片类型规格-->
<!-- 									<li class="sp-img">
										<a href="javascript:void(0);" class="hovered" title="红色">
											<img src="/images/1_05374569268411268_60.png">红色<i></i>
										</a>
									</li> -->
									<!-- 图片类型规格-->
									<foreach name="goods.goods_spec" item="vo">
									<if condition="$vo neq ''">
									<if condition="$vo.size neq ''">
									<li class="sp-img">
										
										<a href="javascript:void(0);" class="" title="{$vo.name}" style="padding: 0 8px 0 8px;" data-specid="{$vo.id}" data-specsize="{$vo.size}" nytcdata="goods_spec">
											{$vo.name}<i></i>
										</a>
										
									</li>
									<else />
									<li class="sp-img">
										
										<a href="javascript:void(0);" class="" title="{$vo.name}" style="padding: 0 8px 0 8px;" data-specname="{$vo.name}">
											{$vo.name}<i></i>
										</a>
										
									</li>
									</if>
									</if>
									</foreach>
								</ul>
							</dd>
							</dl>
							</if>
						 </eq>
						<!-- E 商品规格值-->
					</div>			
					<!-- S 购买数量及库存 -->
					<div class="ncs-buy">
						<div class="ncs-figure-input">
							<input type="text" name="" id="quantity" value="1" size="3" maxlength="6" class="input-text">
							
							<a href="javascript:void(0)" class="increase" nctype="increase">&nbsp;</a>
							<a href="javascript:void(0)" class="decrease" nctype="decrease">&nbsp;</a>
						</div>
						<div class="ncs-point" style="display: none;"><i></i>
							<!-- S 库存 -->
							<span>您选择的商品库存<strong nctype="goods_stock">{$goods.goods_storage}</strong>件</span>
							<!-- E 库存 -->
						</div>

						<!-- S 提示已选规格及库存不足无法购买 -->
						<div nctype="goods_prompt" class="ncs-point" style="display: none;"><i></i> <span>您选择的商品<strong>库存不足</strong>；请选择店内其它商品。</span> </div>
						<!-- E 提示已选规格及库存不足无法购买 -->
						<!-- S 购买按钮 -->
						<div class="ncs-btn">
							<!-- v5.2 限制购买-->
							<!--加入购物车<-->
							<!--库存不足class加上no-addcart-->
							<a href="javascript:;" nctype="addcart_submit" class="addcart " title="加入购物车"><i class="icon-shopping-cart"></i>加入购物车</a>
							<!-- 立即购买-->
							<!--库存不足class加上no-buynow-->
							<a href="javascript:;" nctype="buynow_submit" class="buynow " title="立即购买">立即购买</a>
							<form action="/shop/buy_step1.html?act=buy&op=buy_step1" method="POST" id="form_buy">
							 <input type="hidden" name="goods_nums" id="goods_nums" value="1">
							  <input type="hidden" name="goods_id" value="{$goods.id}">
								<input type="hidden" name="colorid" data-ids="colorid" value="" maxlength="6" class="input-text">
								<input type="hidden" name="specid" data-ids="specid" value="" maxlength="6" class="input-text">
								
								<input type="hidden" name="color_n" data-ids="color_n" value="" maxlength="6" class="input-text">
								<input type="hidden" name="spec_n" data-ids="spec_n" value="" maxlength="6" class="input-text">
						   </form>
							<!-- S 加入购物车弹出提示框 -->

							 <div class="ncs-cart-popup" style="display: none;">
								<dl>
								  <dt>成功添加到购物车<a title="关闭" onclick="$('.ncs-cart-popup').css({'display':'none'});">X</a></dt>
								  <dd>购物车共有 <strong id="bold_num"></strong> 件商品 总金额为：<em id="bold_mly" class="saleP"></em></dd>
								  <dd class="btns"><a href="javascript:void(0);" class="ncbtn-mini ncbtn-mint" onclick="location.href='/shop/shop_cart.html?type=shop_cart'">查看购物车</a> <a href="javascript:void(0);" class="ncbtn-mini" value="" onclick="$('.ncs-cart-popup').css({'display':'none'});">继续购物</a></dd>
								</dl>
							  </div>
							<!-- E 加入购物车弹出提示框 -->
						</div>
						<!-- E 购买按钮 -->
					</div>

					<!-- E 购买数量及库存 -->
					<!-- S消费者保障服务 -->
					<!-- E消费者保障服务 -->
					<!--E 商品信息 -->
				</div>
				<!-- E 商品图片及收藏分享 -->
				<div class="ncs-handle">
					<!-- S 分享 -->
					<a href="javascript:;" class="share"><i></i>分享<span>(<em nc_type="sharecount_100101">0</em>)</span></a>
					<!-- S 收藏 -->
					<a href="javascript:;" class="favorite"><i></i>收藏商品<span>(<em nctype="goods_collect">0</em>)</span></a>
					<!-- S 对比 -->
					<a href="javascript:;" class="compare"><i></i>加入对比</a>
					<!-- S 举报 -->
					<a href="javascript:;" title="举 报" class="inform"><i></i>举&nbsp;报</a>
					<!-- End -->
				</div>

				<!--S 店铺信息-->
				<div class="store-info">
					<style>
						.ncs-info .btns .chat_online,
						.ncs-info .btns .chat_offline {
							padding-left: 10px;
							width: 73px;
							line-height: 21px !important;
							background: url("images/chat_state_01.gif") no-repeat;
						}
						
						.ncs-info .btns .chat_online {
							background-position: 8px 2px;
						}
						
						.ncs-info .btns .chat_offline {
							background-position: 8px -19px;
						}
						
						.ncs-info .btns span a:hover {
							background: url("images/chat_state_01.gif") no-repeat 8px 2px;
						}
					</style>
					<!--店铺基本信息 S-->
					<div class="ncs-info">
						<div class="content">
							<div class="store-logo">
								<a title="{$goods.store.store_name}" target="_blank" href="#">
								<eq name="goods.store.label_s" value="1">
								<img src="{$goods.store.store_label}" alt="{$goods.store.store_name}">
								<else/>
								<img src="__PUBLIC__/Home/images/store_ssa.png" alt="{$goods.store.store_name}">
								</eq>
								
								</a>
							</div>
							<div class="title">
								<h4>								
								<a class="name" title="{$goods.store.store_name}" target="_blank" href="/shop/show_store.html?stid={$goods.st_id}">{$goods.store.store_name}</a>
								<if condition="$goods.store.is_own_shop eq '1'">
								<em>自营</em>
								</if>
								
								</h4>
							</div>

							<div class="btns clearfix">
								<a href="/shop/show_store.html?stid={$goods.st_id}" class="goto">进店逛逛</a>
								<a href="javascript:collect_store('1','count','store_collect')">收藏店铺<span>(<em nctype="store_collect">{$goods.store.store_collect}</em>)</span></a>

								<eq name="goods.store.qq" value="1">
								<a target=blank href=tencent://message/?uin={$goods.store.store_qq}&Site=bb&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:{$goods.store.store_qq}:4 alt="点击这里给我发消息"></a>
								</eq>
								<!-- <a href="#"><img border="0" src="/images/online.aw" alt="点击这里给我发消息" style=" vertical-align: text-bottom;"> 旺旺</a> -->
							</div>
						</div>
					</div>

					<!--<script>
						$(function() {
							var store_id = "1";
							var goods_id = "100101";
							var act = "goods";
							var op = "index";
							$.getJSON("index.php?act=show_store&op=ajax_flowstat_record", {
								store_id: store_id,
								goods_id: goods_id,
								act_param: act,
								op_param: op
							});
						});
					</script>-->
					<!--S 看了又看 最新-->
					<div class="ncs-lal">
						<div class="content">
							<ul>
								<foreach name="st_g_new" item="vo">
								<li>
									<div class="goods-pic">
										<a title="{$vo.productname}" href="/shop/goods.html?gid={$vo.id}"> <img alt="" src="{$vo.pic}" data-url="{$vo.pic}" style="display: inline;"> </a>
									</div>
									<div class="goods-price">
									<if condition="$vo.price gt 0">
									￥{$vo.price}
										<if condition="$vo.point_num gt 0">
											+
										</if>
									</if>
									<if condition="$vo.point_num gt 0">
									{$vo.point_num}&nbsp;积分
									</if>
									<if condition="$vo.coin_num gt 0">
									{$vo.coin_num}&nbsp;币
									</if>	
									</div>
								</li>
								</foreach>

							</ul>
						</div>
					</div>
					<!--E 看了又看 -- > 
    <!--E 店铺信息 -->
				</div>
				<div class="clear"></div>
			</div>
			<!-- S 优惠套装 -->
			<div class="ncs-recommend">
				<div class="title">
					<h4>店铺热卖</h4>
				</div>
				<div class="content">
					<ul>
					<foreach name="host_sell" item="vo">
						<li>
							<dl>
								<dt class="goods-name"><a href="/shop/goods.html?gid={$vo.id}" target="_blank" title="{$vo.productname}">{$vo.productname}</a></dt>
								<dd class="goods-pic">
									<a href="/shop/goods.html?gid={$vo.id}" target="_blank" title="{$vo.productname}">
										<img src="{$vo.pic}" alt="{$vo.productname}" style="display: inline;">
									</a>
								</dd>
								<dd class="goods-price">
									<if condition="$vo.price gt 0">
									￥{$vo.price}
										<if condition="$vo.point_num gt 0">
											+
										</if>
									</if>
									<if condition="$vo.point_num gt 0">
									{$vo.point_num}&nbsp;积分
									</if>
									<if condition="$vo.coin_num gt 0">
									{$vo.coin_num}&nbsp;币
									</if>								
								</dd>
							</dl>
						</li>
					</foreach>

					</ul>
					<div class="clear"></div>
				</div>
			</div>
			<div class="ncs-promotion" id="nc-bundling" style="display:none;"></div>
			<!-- E 优惠套装 -->
			<div id="content" class="ncs-goods-layout expanded">
				<div class="ncs-goods-main" id="main-nav-holder">
					<div class="tabbar pngFix" id="main-nav">
						<div class="ncs-goods-title-nav">
							<ul id="categorymenu">
								<li class="current">
									<a id="tabGoodsIntro" href="javascript:;">商品详情</a>
								</li>
								<li class="">
									<a id="tabGoodsRate" href="javascript:;">商品评价<em>(0)</em></a>
								</li>
								<li>
									<a id="tabGoodsTraded" href="javascript:;">销售记录<em>(0)</em></a>
								</li>
								<li>
									<a id="tabGuestbook" href="javascript:;">购买咨询</a>
								</li>
								<li class="qrcode"><i>手机购买</i><img width="111" height="111" src="__PUBLIC__/Home/images/100101.png"></li>
							</ul>
							<div class="switch-bar">
								<a href="javascript:void(0)" id="fold">&nbsp;</a>
							</div>
						</div>
					</div>
					<div class="ncs-intro">
						<div class="content bd" id="ncGoodsIntro">
							<ul class="nc-goods-sort" style="border-bottom:0;">
								<li>屏幕尺寸：不限</li>
								<li>网络：不限</li>
								<li>运行内存：不限</li>
								<li>电池容量：不限</li>
							</ul>
							<div class="ncs-goods-info-content">
								<div class="default">
									<div class="detail-correction" style="margin:0px;padding:8px 0px 8px 10px;color:#666666;font-family:Arial, Verdana, 宋体;">
										如果您发现商品信息不准确，
										<a>欢迎纠错</a>
									</div>
									<div class="detail-content-item" style="margin:0px;padding:0px;color:#666666;font-family:Arial, Verdana, 宋体;">
										<div id="activity_header" style="margin:0px;padding:0px;">
										</div>
										<div id="J-detail-content" style="margin:0px;padding:0px;">
											<div style="margin:0px;padding:0px;text-align:center;">
											<!--商品详情 开始-->
											{$goods.content|htmlspecialchars_decode}

											<!--商品详情 结束-->
											</div>

										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					
					
					<div class="ncs-comment" style="">
						<div class="ncs-goods-title-bar hd">
							<h4><a href="javascript:;">商品评价</a></h4>
						</div>
						<div class="ncs-goods-info-content bd" id="ncGoodsRate" style="">
							<div class="top">
								<div class="rate">
									<p><strong>100</strong><sub>%</sub>好评</p>
									<span>共有0人参与评分</span></div>
								<div class="percent">
									<dl>
										<dt>好评<em>(100%)</em></dt>
										<dd><i style="width: 100%"></i></dd>
									</dl>
									<dl>
										<dt>中评<em>(0%)</em></dt>
										<dd><i style="width: 0%"></i></dd>
									</dl>
									<dl>
										<dt>差评<em>(0%)</em></dt>
										<dd><i style="width: 0%"></i></dd>
									</dl>
								</div>
								<div class="btns"><span>您可对已购商品进行评价</span>
									<p>
										<a href="#" class="ncbtn ncbtn-grapefruit" target="_blank"><i class="icon-comment-alt"></i>评价商品</a>
									</p>
								</div>
							</div>
							<div class="ncs-goods-title-nav">
								<ul id="comment_tab">
									<li data-type="all" class="+.0 QS">
										<a href="javascript:;">商品评价(0)</a>
									</li>
									<li data-type="1" class="">
										<a href="javascript:;">好评(0)</a>
									</li>
									<li data-type="2" class="">
										<a href="javascript:;">中评(0)</a>
									</li>
									<li data-type="3" class="">
										<a href="javascript:;">差评(0)</a>
									</li>
									<li data-type="4" class="">
										<a href="javascript:;">有图(0)</a>
									</li>
								</ul>
							</div>
							<!--商品评价内容部分-->
							<div id="goodseval" class="ncs-commend-main">
								<!--<div class="ncs-norecord">暂无符合条件的数据记录</div>-->
								<div id="h" class="ncs-commend-floor">
									<div class="user-avatar">
										<a href="#" target="_blank">
											<img src="__PUBLIC__/Home/images/default_user_portrait.gif">
										</a>
									</div>
									<dl class="detail">
										<dt>
      								<span class="user-name">
            						<a href="#" target="_blank">qq1905678506</a>
            					</span>
      								<time pubdate="pubdate">[2017-03-21]</time>
    								</dt>
										<dd>用户评分：<span class="raty" data-score="5" style="width: 100px;">
											<img src="__PUBLIC__/Home/images/star-on.png" alt="1" >&nbsp;
											<img src="__PUBLIC__/Home/images/star-on.png" alt="2" >&nbsp;
											<img src="__PUBLIC__/Home/images/star-on.png" alt="3" >&nbsp;
											<img src="__PUBLIC__/Home/images/star-on.png" alt="4" >&nbsp;
											<img src="__PUBLIC__/Home/images/star-on.png" alt="5" >
											<input type="hidden" name="score" value="5" readonly="readonly"></span></dd>
										<dd class="content">评价详情：<span>好评11asddafdsafsdzfgsdfgdsgvvzxvcvdfgsdfadasvggzdf sdgv sdgsadg dsg sdgv zdgb</span></dd>
									</dl>
								</div>
							</div>
						</div>
					</div>
					<div class="ncg-salelog">
						<div class="ncs-goods-title-bar hd">
							<h4><a href="javascript:void(0);">销售记录</a></h4>
						</div>
						<div class="ncs-goods-info-content bd" id="ncGoodsTraded">
							<div class="top">
								<div class="price">{$pay_name}<strong>{$m_html}</strong><span>购买的价格不同可能是由于店铺往期促销活动引起的，详情可以咨询卖家</span></div>
							</div>
							<!-- 成交记录内容部分 -->
							<div id="salelog_demo" class="ncs-loading">

								<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt10">
									<thead>
										<tr>
											<th class="w200">买家</th>
											<th class="w100">购买价</th>
											<th class="">购买数量</th>
											<th class="w200">购买时间</th>
										</tr>
									</thead>
									<!--<tbody>
										<tr>
											<td colspan="10" class="ncs-norecord">暂无符合条件的数据记录</td>
										</tr>
									</tbody>-->
									<tbody>
										<tr>
											<td>
												<a href="#" target="_blank">mimi</a>
											</td>
											<td><em class="price">
									<if condition="$goods.price gt 0">
									￥{$goods.price}
										<if condition="$goods.point_num gt 0">
											+
										</if>
									</if>
									<if condition="$goods.point_num gt 0">
									{$goods.point_num}&nbsp;积分
									</if>
									<if condition="$goods.coin_num gt 0">
									{$goods.coin_num}&nbsp;币
									</if>											
											
											</em> <i style="color:red;"></i></td>
											<td>1</td>
											<td><time>2017-03-27 18:11:44</time></td>
										</tr>
									</tbody>
									<tfoot>
										<tr>
											<td colspan="10" class="tr">
												<div class="pagination">
													<ul>
														<li><span>首页</span></li>
														<li><span>上一页</span></li>
														<li><span class="currentpage">1</span></li>
														<li><span>下一页</span></li>
														<li><span>末页</span></li>
													</ul>
												</div>
											</td>
										</tr>
									</tfoot>
								</table>
							</div>
						</div>
					</div>
					<div class="ncs-consult">
						<div class="ncs-goods-title-bar hd">
							<h4><a href="javascript:;">购买咨询</a></h4>
						</div>
						<div class="ncs-goods-info-content bd" id="ncGuestbook">
							<!-- 咨询留言内容部分 -->
							<div id="consulting_demo" class="ncs-loading">

								<div class="top" style="overflow: hidden;">
									<div class="ncs-cosult-tips"> <i></i>
										<p>因厂家更改商品包装、场地、附配件等不做提前通知，且每位咨询者购买、提问时间等不同。为此，客服给到的回复仅对提问者3天内有效，其他网友仅供参考！给您带来的不变还请谅解，谢谢！</p>
									</div>
									<div class="ncs-cosult-askbtn">
										<a href="#" target="_blank" class="ncbtn ncbtn-grapefruit">我要提问</a>
									</div>
								</div>
								<div class="ncs-cosult-main" style="padding: 0;border-top-width: 1px;">
								<!--<div class="ncs-norecord">还没有咨询内容</div>-->
									<div class="ncs-cosult-list">
										<dl class="asker">
											<dt>咨询网友：</dt>
											<dd>
												qq*** <time class="ml20">2017-03-21 17:12:34</time>
											</dd>
										</dl>
										<dl class="ask-con">
											<dt>咨询内容：</dt>
											<dd>
												<p>111111</p>
											</dd>
										</dl>
										<dl class="reply">
											<dt>商家回复：</dt>
											<dd>
												<p>2222</p>
												<time>[2017-03-21 17:14:30]</time>
											</dd>
										</dl>
									</div>

									<div class="more">
										<a href="#" target="_blank">查看全部咨询&gt;&gt;</a>
									</div>

								</div>

							</div>
						</div>
					</div>
					<div class="ncs-recommend">
						<div class="title">
							<h4>推荐商品</h4>
						</div>
						<div class="content">
							<ul>
							<foreach name="st_g_recom" item="vo">

								<li>
									<dl>
										<dt class="goods-name"><a href="/shop/goods.html?gid={$vo.id}" target="_blank" title="{$vo.productname}">{$vo.productname}</a></dt>
										<dd class="goods-pic">
											<a href="/shop/goods.html?gid={$vo.id}" target="_blank" title="{$vo.productname}">
												<img src="{$vo.pic}" alt="{$vo.productname}" style="display: inline;">
											</a>
										</dd>
										<dd class="goods-price">
									<if condition="$vo.price gt 0">
									¥{$vo.price}
										<if condition="$vo.point_num gt 0">
											+
										</if>
									</if>
									<if condition="$vo.point_num gt 0">
									{$vo.point_num}&nbsp;积分
									</if>
									<if condition="$vo.coin_num gt 0">
									{$vo.coin_num}&nbsp;币
									</if>
										
										</dd>
									</dl>
								</li>
								</foreach>
							</ul>
							<div class="clear"></div>
						</div>
					</div>
				</div>
				<div class="ncs-sidebar">
					<div class="ncs-message-bar">
						<div class="default">
							<h5><a href="/shop/show_store.html?stid={$goods.st_id}" title="{$goods.store.store_name}" class="store_name">{$goods.store.store_name}</a></h5>
							<span member_id="1"></span>
								<eq name="goods.store.qq" value="1">
								<a target=blank href=tencent://message/?uin={$goods.store.store_qq}&Site=bb&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:{$goods.store.store_qq}:4 alt="点击这里给我发消息"></a>
								</eq>							
								<!-- <a target="_blank" href="#"><img border="0" src="/images/online.aw" alt="点击这里给我发消息" style=" vertical-align: middle;"></a> -->
						</div>
					</div>

					<div class="ncs-sidebar-container ncs-class-bar">
						<div class="title">
							<h4>商品分类</h4>
						</div>
						<div class="content">
							<p>
								<span><a href="#">按新品</a></span>
								<span><a href="#">按价格</a></span>
								<span><a href="#">按销量</a></span>
								<span><a href="#">按人气</a></span>
							</p>
							<div class="ncs-search">
								<form id="" name="searchShop" method="get" action="#">
									<input type="hidden" name="act" value="show_store">
									<input type="hidden" name="op" value="goods_all">
									<input type="hidden" name="store_id" value="1">
									<input type="text" class="text w120" name="inkeyword" value="" placeholder="搜索店内商品">
									<a href="javascript:document.searchShop.submit();" class="ncbtn">搜索</a>
								</form>
							</div>
							<ul class="ncs-submenu">
								<li><span class="ico-none"><em>-</em></span>
									<a href="#">全部商品</a>
								</li>
								<li><span class="ico-none" onclick="class_list(this);" span_id="3" style="cursor: pointer;"><em>-</em></span>
									<a href="#">品牌手机</a>
									<ul id="stc_3" style="display: block;">
										<li><span class="ico-sub">&nbsp;</span>
											<a href="#">最新优惠</a>
										</li>
									</ul>
								</li>
								<li> <span class="ico-none"><em>-</em></span>
									<a href="#">最新活动</a>
								</li>
							</ul>

						</div>
					</div>

					<div class="ncs-sidebar-container hao-look-look">
						<div class="title">
							<h4>看了又看</h4>
						</div>
						<div class="content">
							<ul>
								
								<foreach name="st_g_new" item="vo">
								<li>
									<dl>
										<dt class="goods-name">
											<a href="/shop/goods.html?gid={$vo.id}" target="_blank" title="{$vo.productname}">{$vo.productname}<em></em></a>
										</dt>
										<dd class="goods-pic">
											<a href="/shop/goods.html?gid={$vo.id}" target="_blank" title="{$vo.productname}">
												<img src="{$vo.pic}" style="display: inline;">
											</a>
										</dd>
										<dd class="goods-price">
										
									<if condition="$vo.price gt 0">
									¥{$vo.price}
										<if condition="$vo.point_num gt 0">
											+
										</if>
									</if>
									<if condition="$vo.point_num gt 0">
									{$vo.point_num}&nbsp;积分
									</if>
									<if condition="$vo.coin_num gt 0">
									{$vo.coin_num}&nbsp;币
									</if>
										
										</dd>
									</dl>
								</li>
								</foreach>

							</ul>
							<div class="clear"></div>
						</div>
					</div>
					<div class="ncs-sidebar-container ncs-top-bar">
						<div class="title">
							<h4>商品排行</h4>
						</div>
						<div class="content">
							<ul class="ncs-top-tab pngFix">
								<li id="hot_sales_tab" class="current">
									<a href="#">热销TOP5</a>
								</li>
								<li id="hot_collect_tab">
									<a href="#">人气TOP5</a>
								</li>
							</ul>
							<div id="hot_sales_list" class="ncs-top-panel">
								<ol>
								<foreach name="host_sell" item="vo">
									<li>
										<dl>
											<dt><a title="{$vo.productname}" href="/shop/goods.html?gid={$vo.id}">{$vo.productname}</a></dt>
											<dd class="goods-pic">
												<a title="{$vo.productname}" href="/shop/goods.html?gid={$vo.id}">
													<span class="thumb size60"><i></i>
														<img src="{$vo.pic}" width="60" height="60" style="display: inline;">
													</span>
												</a>
												<p>
													<span class="thumb size100"><i></i>
														<img src="{$vo.pic}" title="{$vo.productname}" width="100" height="100" style="display: inline;">
														<big></big><small></small>
													</span>
												</p>
											</dd>
											<dd class="price pngFix">
											
											<if condition="$vo.price gt 0">
											¥{$vo.price}
												<if condition="$vo.point_num gt 0">
													+
												</if>
											</if>
											<if condition="$vo.point_num gt 0">
											{$vo.point_num}&nbsp;积分
											</if>
											<if condition="$vo.coin_num gt 0">
											{$vo.coin_num}&nbsp;币
											</if>
											</dd>
											<dd class="selled pngFix">售出：<strong>{$vo.goods_salenum}</strong>笔</dd>
										</dl>
									</li>
									</foreach>
								</ol>
							</div>
							<div id="hot_collect_list" class="ncs-top-panel hide">
								<ol>
								<foreach name="host_collect" item="vo">
									<li>
										<dl>
											<dt><a title="{$vo.productname}" href="/shop/goods.html?gid={$vo.id}">{$vo.productname}</a></dt>
											<dd class="goods-pic">
												<a title="{$vo.productname}" href="/shop/goods.html?gid={$vo.id}">
													<span class="thumb size60"><i></i>
														<img src="{$vo.pic}" width="60" height="60" style="display: inline;">
													</span>
												</a>
												<p>
													<span class="thumb size100"><i></i>
														<img src="{$vo.pic}" title="{$vo.productname}" width="100" height="100" style="display: inline;">
														<big></big><small></small>
													</span>
												</p>
											</dd>
											<dd class="price pngFix">
											
											<if condition="$vo.price gt 0">
											¥{$vo.price}
												<if condition="$vo.point_num gt 0">
													+
												</if>
											</if>
											<if condition="$vo.point_num gt 0">
											{$vo.point_num}&nbsp;积分
											</if>
											<if condition="$vo.coin_num gt 0">
											{$vo.coin_num}&nbsp;币
											</if>
											
											</dd>
											<dd class="collection pngFix">收藏人气：<strong>{$vo.goods_collect}</strong></dd>
										</dl>
									</li>
									</foreach>

								</ol>
							</div>
							<p>
								<a href="/shop/show_store.html?stid={$goods.st_id}">查看本店其他商品</a>
							</p>
						</div>
					</div>


				</div>
			</div>
		</div>
		<form id="buynow_form" method="post" action="#">
			<input id="act" name="act" type="hidden" value="buy">
			<input id="op" name="op" type="hidden" value="buy_step1">
			<input id="cart_id" name="cart_id[]" type="hidden">
		</form>

					<script type="text/javascript">
						$(document).ready(function() {
						
							//热销排行切换
							$('#hot_sales_tab').on('mouseenter', function() {
								$(this).addClass('current');
								$('#hot_collect_tab').removeClass('current');
								$('#hot_sales_list').removeClass('hide');
								$('#hot_collect_list').addClass('hide');
							});
							$('#hot_collect_tab').on('mouseenter', function() {
								$(this).addClass('current');
								$('#hot_sales_tab').removeClass('current');
								$('#hot_sales_list').addClass('hide');
								$('#hot_collect_list').removeClass('hide');
							});
						});
						/** left.php **/
						// 商品分类
						function class_list(obj) {
							var stc_id = $(obj).attr('span_id');
							var span_class = $(obj).attr('class');
							if(span_class == 'ico-block') {
								$("#stc_" + stc_id).show();
								$(obj).html('<em>-</em>');
								$(obj).attr('class', 'ico-none');
							} else {
								$("#stc_" + stc_id).hide();
								$(obj).html('<em>+</em>');
								$(obj).attr('class', 'ico-block');
							}
						}
					</script>
		
		<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.charCount.js"></script>
		<script src="__PUBLIC__/Home/js/jquery.ajaxContent.pack.js" type="text/javascript"></script>
		<script src="__PUBLIC__/Home/js/sns.js" type="text/javascript" charset="utf-8"></script>
		<script src="__PUBLIC__/Home/js/jquery.F_slider.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="__PUBLIC__/Home/js/waypoints.js"></script>
		<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.raty.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/Home/js/custom.min.js" charset="utf-8"></script>
		<link href="__PUBLIC__/Home/css/nyroModal.css" rel="stylesheet" type="text/css" id="cssfile2">

		<script type="text/javascript">
		
			var colorid = '' ;
			var specid = '' ;
			var gid = "{$goods.id}" ;
			var sys_item = '' ;
			var getid = '' ;		
		
		
					/** 辅助浏览 **/

			//产品图片
			jQuery(function($) {
				// 放大镜效果 产品图片
				//CloudZoom.quickStart();

				// 图片切换效果
				$(".controller li").first().addClass('current');
				$('.controller').find('li').mouseover(function() {
				
					var src = $(this).find('img').attr('src');					
					var href = $("#zoom1").attr('href',src);
					var src2 = $("#zoom1 img").attr('src',src);
					//alert(src2);
					
					$(this).first().addClass("current").siblings().removeClass("current");
				});
			});

			//选择地区
			var shop_address = $("#shop_address").val();
			var se_tml = '';
			if (shop_address) {
				se_tml = '<span id="_area_span" class="_region_value"> '+shop_address+'</span><input type="button" class="input-btn" id="chenge" value="编辑">';
				$("#shop_address").after(se_tml);
			} else {
				se_tml = '<select name="shop_province" id="shop_province"><option value="">-请选择-</option><volist name="code" id="vo"><option value="{$vo.area_name}" data-id="{$vo.area_id}">{$vo.area_name}</option></volist></select>';
				$("#shop_address").after(se_tml);
			}

			$("#chenge").live('click',function(){
				se_tml = '<select name="shop_province" id="shop_province"><option value="">-请选择-</option><volist name="code" id="vo"><option value="{$vo.area_name}" data-id="{$vo.area_id}">{$vo.area_name}</option></volist></select>';
				$("#_area_span").hide();
				$("#chenge").hide();
				$("#shop_address").after(se_tml);	
			});

				$("select").live('change',function(){
					var option = $(this).val();
					var data_id = $(this).find("option[value='"+option+"']").attr("data-id");
					var next = $(this).next("select").html();         
					var id = $(this).attr('id');
					var name ='city';
					var length = $("select").length;		
					var next_p = '';

					var province = $('#shop_province').val();
					var city = $('#shop_city').val();
					var area = $('#shop_area').val();
					var address = '';	
					
					if (province) {
						address = province;
					}
					if (city==option) {
						address = address +' '+ city;
					} 
					
					if (area==option) {
						address = address +' '+ city +' '+ area;
					}
					
					$('#shop_address').val(address);		
					
					if (option) {
						if (next) {
							
							if (length<3) {
								name ='shop_city';
							} else {
								if (id=='shop_province') {						
									name ='shop_city';
									next_p = 1;
								} else {
									name ='shop_area';
								}					
							}
						} else {
							if (length<2) {
								name ='shop_city';					
							} else {
								name ='shop_area';
							}			
						}

						if (id!=='shop_area') {
							get_area(data_id,next,$(this),name,next_p);	
						}						
					} else {			
						$(this).next("select").remove();
					}

				});

				//市级、区数据
				function get_area(id,next,option,name,next_p) {
					var url='/Shop/code_chage';		
					$.ajax({
						url:url,
						data:{id:id},
						type:'post',
						dataType:'json',
						success:function (data) {
							var a = data;
							var html = '';
							for(var i=0;i<a.length;i++ ) {								
								html += '<option value ="'+a[i].area_name+'" data-id="'+a[i].area_id+'">'+a[i].area_name+'</option>';
							}
							
							if (html) {
								if (next) {	
									if (next_p) {
										option.nextAll("select").html('<option value="">-请选择-</option>'+html);
										option.next().nextAll("select").remove();
									} else {
										option.next("select").html('<option value="">-请选择-</option>'+html);
									}
									
								} else {
									option.after('<select name="'+name+'" id="'+name+'"><option value="">-请选择-</option>'+html+'</select>');
								}				
							}
							
						}
					});		
				}			
			
			
			
			
			//收藏分享处下拉操作
			jQuery.divselect = function(divselectid, inputselectid) {
				var inputselect = $(inputselectid);
				$(divselectid).mouseover(function() {
					var ul = $(divselectid + " ul");
					ul.slideDown("fast");
					if(ul.css("display") == "none") {
						ul.slideDown("fast");
					}
				});
				$(divselectid).live('mouseleave', function() {
					$(divselectid + " ul").hide();
				});
			};

			
			$(function() {
				//赠品处滚条
				$('#ncsGoodsGift').perfectScrollbar({
					suppressScrollX: true
				});
				$('a[nctype="addcart_submit"]').click(function(){
					
					if (typeof(allow_buy) != 'undefined' && allow_buy === false) return ;
					var goods_id = "{$goods.id}" ;
					var spcen = "{$goods.goods_c}" ;
					var spcen2 = "{$goods.goods_s}" ;
					
					if(spcen>0){
						if(!$("[data-ids='colorid']").val() && !$("[data-ids='color_n']").val()){
							alert("请选择规格");return false;
						}						
					}
					//console.log(spcen2);
					if(spcen2>0){
						if(!$("[data-ids='specid']").val() && !$("[data-ids='spec_n']").val()){
							alert("请选择规格");return false;
						}
					}
					
					
					addcart(goods_id, checkQuantity(),'addcart_callback');
				})
				// 到货通知
				//				$('a[nctype="arrival_notice"]').click(function() {
				//					login_dialog();
				//				});
				//浮动导航  waypoints.js
				$('#main-nav').waypoint(function(event, direction) {
					$(this).parent().parent().parent().toggleClass('sticky', direction === "down");
					event.stopPropagation();
				});

				// 分享收藏下拉操作
				$.divselect("#handle-l");
				$.divselect("#handle-r");
				
				var type = false;
				
				// 规格选择
				$('dl[nctype="nc-spec"]').find('a').each(function() {
					$(this).click(function() {
					
						var names_1 = $(this).attr("nytcdata") ;
						var id_1 = $(this).attr("data-colorid") ;
						var id_2 = $(this).attr("data-specid") ;
						
						var name_1 = $(this).attr('data-colorname');
						var name_2 = $(this).attr('data-specname');
						
						//字符串转换成数组
						if (id_1) {
							colorid = id_1 ;
							$("[data-ids='colorid']").val(id_1);
							type = false;
							
						}
						if (id_2) {
							specid = id_2 ;
							$("[data-ids='specid']").val(id_2);
							type = false;
						}
						
						if(name_1){
							colorid = name_1 ;
							$("[data-ids='color_n']").val(name_1);
							type = true ;
						}
						if(name_2){
							specid = name_2 ;
							$("[data-ids='spec_n']").val(name_2);
							type = true;
						}

						if($(this).hasClass('hovered')) {
							return false;
						}
						
						$(this).parents('ul:first').find('a').removeClass('hovered');
						$(this).addClass('hovered');
									
						var vals = '';
						var mar_v = '' ;
						var pr_v = '' ;
						var po_v = '' ;
						var st_v = '' ;
						var al_v = '' ;
						var sku_v = '' ;
						vals = checkSpec(type);
						//console.log(vals);	
						if(vals){
							 mar_v = vals.marketprice ;
							 pr_v = vals.price ;
							 po_v =  vals.point_num ;
							 st_v =  vals.stock ;
							 al_v = vals.alarm ;
							 sku_v = vals.sku ;	
							if (!mar_v) {
								mar_v = 0 ;
							}
							if (!pr_v) {
								pr_v = 0 ;
							}
							if (!st_v) {
								st_v = 0 ;
							}
							if (!al_v) {
								al_v = 0 ;
							}
							if (!sku_v) {
								sku_v = 0 ;
							}	
							if (!po_v) {
								po_v = 0 ;
							}
							var unit = '' ;
							unit = "{$unit}";
							if(pr_v && !po_v){
								if (unit) {
									$(".price > strong").html(pr_v+unit);
								} else {
									$(".price > strong").html("￥"+pr_v);
								}
								
							}
							if(pr_v && po_v){								
								$(".price > strong").html("￥"+pr_v+"+"+po_v+unit);
							}
							$("#ncs-freight-prompt > strong").html('库存：'+st_v+'件');
							$(".cost-price > strong").html('￥：'+mar_v);
						}

					});
				});

			});
			
			function checkSpec(type) {
			
				var spec_item = false ;
				spec_item = colorid+'|'+specid;
				
				if(gid!=getid){
					sys_item = false ;
					getid = gid ;
				}
				
				if (!sys_item && colorid && specid && gid) {
				
					$.ajax({
						url:"/shop/goods.html?gid="+gid,
						data:{goods_spec_all:'runing',type:type},
						type:"post",
						dataType:"json",
						async:false,
						success:function(e){
							sys_item = e ;	
							
						}
					});	
					console.log(sys_item);					
					return sys_item[spec_item] ;
					
				} else {
					return sys_item[spec_item] ;
				}
			}
			
			// 验证购买数量
			function checkQuantity() {
				var quantity = parseInt($("#quantity").val()); //购买数量
				
				if(quantity < 1) {
					alert("请填写购买数量");
					$("#quantity").val('1');
					return false;
				}
				/*max = parseInt($('[nctype="goods_stock"]').text());
				if(quantity > max) {
					alert("库存不足");
					return false;
				}*/
				
				return quantity;
			}

			// 立即购买js
			//			function buynow(goods_id, quantity, chain_id, area_id, area_name, area_id_2) {
			//				login_dialog();
			//			}

			$(function() {

				/** goods.php **/
				// 商品内容部分折叠收起侧边栏控制
				$('#fold').click(function() {
					$('.ncs-goods-layout').toggleClass('expanded');
				});
				// 商品内容介绍Tab样式切换控制
				$('#categorymenu').find("li").click(function() {
					$('#categorymenu').find("li").removeClass('current');
					$(this).addClass('current');
				});
				// 商品详情默认情况下显示全部
				$('#tabGoodsIntro').click(function() {
					$('.bd').css('display', '');
					$('.hd').css('display', '');
				});
				// 点击地图隐藏其他以及其标题栏
				$('#tabStoreMap').click(function() {
					$('.bd').css('display', 'none');
					$('#ncStoreMap').css('display', '');
					$('.hd').css('display', 'none');
				});
				// 点击评价隐藏其他以及其标题栏
				$('#tabGoodsRate').click(function() {
					$('.bd').css('display', 'none');
					$('#ncGoodsRate').css('display', '');
					$('.hd').css('display', 'none');
				});
				// 点击成交隐藏其他以及其标题
				$('#tabGoodsTraded').click(function() {
					$('.bd').css('display', 'none');
					$('#ncGoodsTraded').css('display', '');
					$('.hd').css('display', 'none');
				});
				// 点击咨询隐藏其他以及其标题
				$('#tabGuestbook').click(function() {
					$('.bd').css('display', 'none');
					$('#ncGuestbook').css('display', '');
					$('.hd').css('display', 'none');
				});
				//商品排行Tab切换
				$(".ncs-top-tab > li > a").mouseover(function(e) {
					if(e.target == this) {
						var tabs = $(this).parent().parent().children("li");
						var panels = $(this).parent().parent().parent().children(".ncs-top-panel");
						var index = $.inArray(this, $(this).parent().parent().find("a"));
						if(panels.eq(index)[0]) {
							tabs.removeClass("current ").eq(index).addClass("current ");
							panels.addClass("hide").eq(index).removeClass("hide");
						}
					}
				});
				//信用评价动态评分打分人次Tab切换
				$(".ncs-rate-tab > li > a").mouseover(function(e) {
					if(e.target == this) {
						var tabs = $(this).parent().parent().children("li");
						var panels = $(this).parent().parent().parent().children(".ncs-rate-panel");
						var index = $.inArray(this, $(this).parent().parent().find("a"));
						if(panels.eq(index)[0]) {
							tabs.removeClass("current ").eq(index).addClass("current ");
							panels.addClass("hide").eq(index).removeClass("hide");
						}
					}
				});

				//触及显示缩略图
				$('.goods-pic > .thumb').hover(
					function() {
						$(this).next().css('display', 'block');
					},
					function() {
						$(this).next().css('display', 'none');
					}
				);

				/* 商品购买数量增减js */
				// 增加
				$('a[nctype="increase"]').click(function() {
					num = parseInt($('#quantity').val());
					max = parseInt($('[nctype="goods_stock"]').text());
					if(num < 1000) {
						$('#quantity').val(num + 1);

					}
						
					var vals =  $('#quantity').val();
					$('#goods_nums').val(vals);
				});
				
				$("#quantity").change(function(){
					var vals =  $('#quantity').val();
					$('#goods_nums').val(vals);
					//alert(vals);
				});
				//减少
				$('a[nctype="decrease"]').click(function() {
					num = parseInt($('#quantity').val());
					if(num > 1) {
						$('#quantity').val(num - 1);
					}
					var vals =  $('#quantity').val();
					$('#goods_nums').val(vals);
				});

				//评价列表
				$('#comment_tab').on('click', 'li', function() {

					$('#comment_tab li').removeClass('current');

					$(this).addClass('current');

				});

				//记录浏览历史
				//				$.get("index.php?act=goods&op=addbrowse", {
				//					gid: 100101
				//				});
				//初始化对比按钮
				//				initCompare();

				//				$('[nctype="show_chain"]').click(function() {
				//					_goods_id = $(this).attr('data-goodsid');
				//					ajax_form('show_chain', '查看门店', 'index.php?act=goods&op=show_chain&goods_id=' + _goods_id, 640);
				//				});

				// 满即送、加价购显示隐藏
				$('[nctype="show-rule"]').click(function() {
					$(this).parent().find('[nctype="rule-content"]').show();
				});
				$('[nctype="hide-rule"]').click(function() {
					$(this).parents('[nctype="rule-content"]:first').hide()
				});

				//				$('.ncs-buy').bind({
				//					mouseover: function() {
				//						$(".ncs-point").show();
				//					},
				//					mouseout: function() {
				//						$(".ncs-point").hide();
				//					}
				//				});

			});

			/* 加入购物车后的效果函数 */
			function addcart_callback(data){
				
				$('#bold_num').html(data.num);
				$('#bold_mly').html(price_format(data.amount));
				$('.ncs-cart-popup').fadeIn('fast');
			}
			/* 加入购物车 */
			function addcart(goods_id,quantity,callbackfunc) {
				
				var url = '/shop/cart_add.html';
				var colorid = 0;
				var specid = 0;
				
				colorid = $("input[name='colorid']").val();
				specid = $("input[name='specid']").val();
				var color_n = $("input[name='color_n']").val();
				var spec_n = $("input[name='spec_n']").val();
				
				quantity = parseInt(quantity);
						
				if(quantity){
					$.ajax({
							url:url,
							data:{goods_id:goods_id,quantity:quantity,type:'cart_add',colorid:colorid,specid:specid,color_n:color_n,spec_n:spec_n},
							type:'post',
							dataType:'json',
							success:function (e) {
								console.log(e);			
								if (e != null) {					
									if (e.state) {
										if(callbackfunc){
											eval(callbackfunc + "(e)");
										}
										$('#rtoobar_cart_count').html(e.num).show();
										$('div .addcart-goods-num').html(e.num).show() ;
										// 头部加载购物车信息
										//load_cart_information();
										$("#rtoolbar_cartlist").load('http://'+SHOP_SITE_URL+'/cart.html?act=cart&op=ajax_load&type=html');
										$('dd[data-type="top_cart"]').load('http://'+SHOP_SITE_URL+'/cart.html?act=cart&op=ajax_load&type=top_cart');
										
									} else {
										alert(e.msg);
									}
							   }
						   }
						});					
				 }
	
			}
			//
			$('[nctype="buynow_submit"]').on('click',function(){
				var st_id= "{$goods.st_id}" ;
				var kucun = "{$goods.goods_storage}" ;				
				var spcen = "{$goods.goods_c}" ;
				var spcen2 = "{$goods.goods_s}" ;
					
				if(spcen>0){
					if(!$("[data-ids='colorid']").val() && !$("[data-ids='color_n']").val()){
						alert("请选择规格");return false;
					}						
				}
					//console.log(spcen2);
				if(spcen2>0){
					if(!$("[data-ids='specid']").val() && !$("[data-ids='spec_n']").val()){
						alert("请选择规格");return false;
					}
				}	
					
				$.ajax({
					type: "post",
					url: "/buy/buy_chack",
					data: {st_id:st_id,atc:'buy_chack'},
					dataType:'json',
					success: function(data) {
						//console.log(data);
						if(data.msg){
							alert(data.msg);				
						} else{
							$("#form_buy").submit();
						}
					}
				 });					
			})

		</script>

 </block>	
